function header(){
    let nav=document.querySelector(".nav");
    let ps=document.querySelectorAll(".nav>p");
    nav.onclick=e=>{
        let tg=e.srcElement;
        if(tg.nodeName=="P"){
            ps.forEach((val,i)=>{
                ps[i].className="";
            })
        }tg.className="active";
    }
}
header();
